import request from "@/utils/newrequst";
// 分页查询组织
export const getTenantPage = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/page-sub`, method: "post", data: data,
  });
};
// 获取组织信息Tree-当前和子级  /api/
export const getTenantTree = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/tree`, method: "post", data: data,
  });
};
// 删除组织 /api/
export const getTenantDelete = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/delete`, method: "post", data: data,
  });
};
// 添加组织 /api/system/v1/tenant/save
export const getTenantAdd = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/save`, method: "post", data: data,
  });
};
// 编辑组织 
export const getTenantEdit = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/edit`, method: "post", data: data,
  });
};
// 中心查看食堂配置 
export const getCenterKitchen = (data: any = {}) => {
  return request({
    url: `/system/system-config/center-view-kitchen`, method: "post", data: data,
  });
};
// 配置下级用户
export const getConfigKitchen = (data: any = {}) => {
  return request({
    url: `/system/system-config/config-kitchen`, method: "post", data: data,
  });
};
// 重置组织密码 
export const getTenantrResetPassword = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/reset-admin-password`, method: "post", data: data,
  });
};
// 区域管理-获取区域信息Tree-当前和子级


export const getTenantAreaTree = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/area/tree`, method: "post", data: data,
  });
};
// 区域管理-获取下级区域列表
export const getTenantAreaPage = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/area/page-sub`, method: "post", data: data,
  });
};
// 区域管理-新增区域
export const getTenantAreaAdd = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/area/save`, method: "post", data: data,
  });
};
// 区域管理-修改区域 
export const getTenantAreaEdit = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/area/edit`, method: "post", data: data,
  });
};
// 区域管理-删除区域
export const getTenantAreaDelete = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/area/delete`, method: "post", data: data,
  });
};

// 获取所有下级组织名称
export const getTenantSubList = (data: any = {}) => {
  return request({
    url: `/system/v1/tenant/list-sub`, method: "post", data: data,
  });
};// 餐段管理- 获取餐段列表 /api/recipe/v1/meal-times/list

export const getMealTimeslist = (data: any = {}) => {
  return request({
    url: `/recipe/v1/meal-times/list`, method: "post", data: data,
  });
};
// 新增餐段
export const getMealTimesSave = (data: any = {}) => {
  return request({
    url: `/recipe/v1/meal-times/save`, method: "post", data: data,
  });
};
// 修改餐段 /api/recipe/v1/meal-times/edit
export const getMealTimesEdit = (data: any = {}) => {
  return request({
    url: `/recipe/v1/meal-times/edit`, method: 'post', data: data,
  })
}
